package pl.edu.uj.tcs.blef.utils;

public final class TwoPairs extends AbstractBet {

	private Card first;
	private Card second;
	
	public TwoPairs(Card first, Card second){
		if(first.compareTo(second) <= 0){
			this.first = first;
			this.second = second;
		} else {
			this.first = second;
			this.second = first;
		}
	}
	
	@Override
	public String getCode() {
		return "TWO-PAIRS " + this.first.getCode() + " " + second.getCode();
	}

	@Override
	public String getName() {
		return "TWO PAIRS " + this.first.getName() + " " + second.getName();
	}

	@Override
	public int getPriority() {
		return 10*first.getPriority() + second.getPriority() + 100;
	}

	public Card getFirst(){
		return this.first;
	}
	
	public Card getSecond(){
		return this.second;
	}
}
